#include<iostream>
#include<vector>
#include<queue>
#include<unordered_map>
using namespace std;

class Solution 
{
public:
    int findKthLargest(vector<int>& nums, int k) 
    {
        priority_queue<int> heap;
        for (int i = 0; i < nums.size(); i++)
        {
            heap.push(nums[i]);
        }

        int count = k - 1;
        while (count--)
        {
            heap.pop();
        }
        int res = heap.top();
        return res;
    }
};

int main()
{
    Solution s1;
    vector<int> v1{ 3,2,3,1,2,4,5,5,6 };
    s1.findKthLargest(v1,4);
    return 0;
}